package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.ProductOrderSettings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RetailProductSettingsMapper;
import com.ruoyi.system.domain.RetailProductSettings;
import com.ruoyi.system.service.IRetailProductSettingsService;

/**
 * 商品零售设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class RetailProductSettingsServiceImpl implements IRetailProductSettingsService
{
    @Autowired
    private RetailProductSettingsMapper retailProductSettingsMapper;

    /**
     * 通过id查询商品零售设置
     *
     * @param id 商品零售设置主键
     * @return 商品零售设置
     */
    @Override
    public RetailProductSettings selectRetailProductSettingsById(Long id)
    {
        return retailProductSettingsMapper.selectRetailProductSettingsById(id);
    }

    /**
     * 查询商品零售设置列表
     *
     * @param retailProductSettings 商品零售设置
     * @return 商品零售设置
     */
    @Override
    public List<RetailProductSettings> selectRetailProductSettingsList(RetailProductSettings retailProductSettings)
    {
        return retailProductSettingsMapper.selectRetailProductSettingsList(retailProductSettings);
    }

    /**
     * 新增商品零售设置
     *
     * @param retailProductSettings 商品零售设置
     * @return 结果
     */
    @Override
    public int insertRetailProductSettings(RetailProductSettings retailProductSettings)
    {
        return retailProductSettingsMapper.insertRetailProductSettings(retailProductSettings);
    }

    /**
     * 修改商品零售设置
     *
     * @param retailProductSettings 商品零售设置
     * @return 结果
     */
    @Override
    public int updateRetailProductSettings(RetailProductSettings retailProductSettings)
    {
        return retailProductSettingsMapper.updateRetailProductSettings(retailProductSettings);
    }

    /**
     * 通过id批量删除商品零售设置信息
     *
     * @param ids 需要删除的商品零售设置主键
     * @return 结果
     */
    @Override
    public int deleteRetailProductSettingsByIds(Long[] ids)
    {
        return retailProductSettingsMapper.deleteRetailProductSettingsByIds(ids);
    }

    /**
     * 通过id删除商品零售设置信息
     *
     * @param id 商品零售设置主键
     * @return 结果
     */
    @Override
    public int deleteRetailProductSettingsById(Long id)
    {
        return retailProductSettingsMapper.deleteRetailProductSettingsById(id);
    }

    /**
     * 通过门店id查询商品零售设置详情
     *
     * @param storeId 门店id
     * @return 商品零售设置详情
     */
    @Override
    public RetailProductSettings selectByStoreId(Long storeId) {
        return retailProductSettingsMapper.selectByStoreId(storeId);
    }

}
